<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        body {
        display: flex;
        height: 800px;
        justify-content: center;
        align-items: center;
      }
      * {
        margin: 0;
        padding: 0;
      }
      ul {
        display: flex;
        width: 600px;
        height: 100px;
        line-height: 100px;
        font-size: 30px;
        animation: move 3s ease 0s infinite alternate;
      }
      ul li {
        /* flex:1干了哪些事情 */
        flex: 1;
        /* 清除列表前面的小圆点 */
        list-style: none;
        text-align: center;
      }
      .red {
        background-color: red;
      }
      .blue {
        background-color: blue;
      }
      .green {
        background-color: green;
      }
      /* 视口容器的宽高应该是一张图片的宽高 */
      .container {
        width: 200px;
        height: 100px;
        border: solid;
        border-radius: 5px;
        overflow: hidden;
      }
      @keyframes move {
        from {
          transform: translateX(0px);
        }
        66.66% {
          transform: translateX(-200px);
        }
        to {
          transform: translateX(-400px);
        }
      }
    </style>
</head>

<body>
    <!-- container就是我们的视口容器 -->
    <div class="container">
        <!-- ul就是电影胶卷 -->
        <ul>
          <!-- li就是每张图片 -->
          <li class="red">red</li>
          <li class="green">green</li>
          <li class="blue">blue</li>
        </ul>
      </div>
</body>

</html>